<h1>Editing flight</h1>

<% form_for(@flight) do |f| %>
  <%= f.error_messages %>

  <p>
    <%= f.label :departure %><br />
    <%= f.datetime_select :departure %>
  </p>
  <p>
    <%= f.label :arrival %><br />
    <%= f.datetime_select :arrival %>
  </p>
  <p>
    <%= f.label :destination %><br />
    <%= f.text_field :destination %>
  </p>
  <p>
    <%= f.label :baggage_allowance %><br />
    <%= f.text_field :baggage_allowance %>
  </p>
  <p>
    <%= f.label :capacity %><br />
    <%= f.text_field :capacity %>
  </p>
  <p>
    <%= f.submit "Update" %>
  </p>
<% end %>

<%= link_to 'Show', @flight %> |
<%= link_to 'Back', flights_path %>
